package cn.com.w.bootdemo.controller;

import java.util.*;
import java.util.function.BiConsumer;

public class CollectionDemo {


    public static void main(String[] args) {

        List<String> strList = new ArrayList<>();
        strList.add("haha");

        strList.forEach((str) -> {

        });

        Map<Integer,String> map=new HashMap<>();
        for (int i=1; i<1000000; i++) {
            map.put(i, "美好的周-"+i);
        }
        map.forEach((key,value)->{
            System.out.println(key);
            System.out.println(value);
        });
        map.forEach(new BiConsumer<Integer, String>() {
            @Override
            public void accept(Integer integer, String s) {

            }
        });

        for(Map.Entry entry:map.entrySet()){
            System.out.println(entry.getKey());
            System.out.println(entry.getValue());
        };




    }











}
